#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017-2019, Intel Corporation

#
# src/test/obj_sds/TEST1 -- unittest for shutdown state
#

. ../unittest/unittest.sh

require_test_type medium

require_fs_type any

require_build_type debug

require_sds ./obj_sds

setup

POOLSET=$DIR/pool.set
# Create poolset file
create_poolset $POOLSET \
			   20M:$DIR/testfile01:x \
			   20M:$DIR/testfile02:x \
			   20M:$DIR/testfile03:x \
			   R \
			   40M:$DIR/testfile14:x \
			   20M:$DIR/testfile15:x

# the pool not closed but there was no an ADR failure
expect_abnormal_exit ./obj_sds 1 1 $POOLSET\
				   5 0 7 0 9 0 11 0 12 0

expect_normal_exit ./obj_sds 0 0 $POOLSET\
				   5 0 7 0 9 0 11 0 12 0

pass
